package com.my12306.user.model.vo;

import com.my12306.user.model.po.FollowEntity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @Author:苏牧夕
 * @Date:2020/6/19 19:28
 * @Version 1.0
 */
public class FollowVo extends FollowEntity implements Serializable {
    /**
     * 被关注人/关注人的用户名称
     */
    private String userName;
    /**
     * 被关注人/关注人的用户头像
     */
    private String imgUrl;

    public FollowVo() {
    }

    public FollowVo(String userName, String imgUrl) {
        this.userName = userName;
        this.imgUrl = imgUrl;
    }


    public FollowVo(Long id, Long fansId, Long masterId, Integer showStatus, Integer logicDelete, Date createDate, Date updateDate, Integer version, String userName, String imgUrl) {
        super(id, fansId, masterId, showStatus, logicDelete, createDate, updateDate, version);
        this.userName = userName;
        this.imgUrl = imgUrl;
    }

    @Override
    public String toString() {
        return "FollowVo{" +
                super.toString() +
                "userName='" + userName + '\'' +
                ", imgUrl='" + imgUrl + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof FollowVo)) return false;
        FollowVo followVo = (FollowVo) o;
        return Objects.equals(getUserName(), followVo.getUserName()) &&
                Objects.equals(getImgUrl(), followVo.getImgUrl());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getUserName(), getImgUrl());
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }
}
